<h1>Listing vouchers</h1>
<table border="1" cellspacing="0" cellpadding="10" bordercolor="#000000">
  <tr>
    <th>日期</th>
    <th>凭证号</th>
    <th>摘要</th>
    <th>金额</th>
    <th colspan="2">操作</th>
  </tr>
<% for voucher in @vouchers %>
  <tr>
  <% for column in Voucher.content_columns %>
    <td><%=h voucher.send(column.name) %></td>
  <% end %>
    <td><%=voucher.get_desc%>&nbsp;</td> 
  
    <td><%= link_to 'Show', :action => 'show', :id => voucher %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => voucher %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => voucher }, :confirm => 'Are you sure?', :post => true %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @voucher_pages.current.previous } if @voucher_pages.current.previous %>
<%= link_to 'Next page', { :page => @voucher_pages.current.next } if @voucher_pages.current.next %>

<br />

<%= link_to 'New voucher', :action => 'new' %>
